<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        // let num = 0
        // for (let i = 10; i <= 1010; i += 40) {
        //     if (i === 1010) {
        //         num = num + i
        //         break
        //     }
        //     let j = i + 20
        //     num += i - j
        // }
        // console.log(num)

        // 竹竿320米，每天截取12米，多少天后竹竿长度少于40米
        let j = 0
        for (let i = 320; i > 40; i -= 12) {
            // console.log(i)
            j++
        }
        // console.log(j)
        console.log(`第${j}天竹竿长度少于40米`);
    </script>
</body>

</html>